package com.sc.nft.util;

import cn.hutool.core.convert.Convert;
import org.apache.commons.lang3.Conversion;
import org.web3j.abi.datatypes.Int;
public class DecideUtil {

    public static Boolean conditionalDecision(Integer key1, Integer key2, String compoundMode) {
        if (key1 == null || key2 == null) {
            return Boolean.FALSE;
        }
        if (compoundMode.equals(">")) {
            return key1 > key2;
        }
        if (compoundMode.equals(">=")) {
            return key1 >= key2;
        }
        if (compoundMode.equals("<")) {
            return key1 < key2;
        }
        if (compoundMode.equals("<=")) {
            return key1 <= key2;
        }
        if (compoundMode.equals("=")) {
            return key1.equals(key2);
        }
        return Boolean.FALSE;
    }

}
